var Province=require('../models/province');
var City=require('../models/city');
var Area=require('../models/area');
//初始化地域数据---省市县
var province=new Province({name:'北京市'});
province.save(function(err,data1){
    new City({name:'北京市',province:data1._id}).save(function(err,data2){
        var areas=['昌平区','朝阳区','大兴区','房山区','丰台区','海淀区','怀柔区','门头沟区','密云县','平谷区','石景山区','顺义区','通州区','延庆县'];
        areas.forEach(function(data3){
            new Area({name:data3,city:data2._id}).save(function(err){
                console.log('地域数据初始化完成');
            })
        })
    })
})
